import {NgModule} from '@angular/core';
import {RouterModule, Routes} from '@angular/router';
import {OnlineExamComponent} from './online-exam.component';
import {ResultComponent} from './result/result.component';
import {ComponentLifeGuard} from '../../../core/services/common/guard/component-life.guard';

const routes: Routes = [
  {
    path: 'result/:name/:score/:useTime',
    canDeactivate: [ComponentLifeGuard],
    component: ResultComponent,
    data: {title: '在线考试', key: 'result', relatedLink: ['online-exam', 'result']}
  },
  {path: '', component: OnlineExamComponent, data: {title: '在线考试', key: 'online-exam', relatedLink: ['online-exam', 'result']}},
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class OnlineExamRoutingModule {
}
